import adminRequest from "@/utils/http/adminRequest.js";

// 分页查询
export const newsPageAPI = (params) => {
    return adminRequest.get('/news/admin/page', {
        params: params
    })
}

// 添加新闻
export const newsAddAPI = (news) => {
    return adminRequest.post('/news/admin', news)
}

// 删除新闻
export const newsDeleteAPI = (ids) => {
    return adminRequest.delete('/news/admin', {
        data: ids
    })
}

// 更新新闻
export const newsUpdateAPI = (news) => {
    return adminRequest.put('/news/admin', news)
}

// 查询新闻
export const newsGetAPI = (id) => {
    return adminRequest.get(`news/admin/${id}`)
}
